package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LIUYANJIAO
 * Date: 2024-05-27
 * Time: 16:25
 */
public class Son extends Father{
   int a=2;
    public void test(){
        System.out.println("子类中的test");
    }

    public void func(){
       //现在要打印a=1，即访问父类中的a
       System.out.println("a="+super.a);
       //要访问父类中的test
        super.test();
   }
}
